#include <iostream>
#include <string>
#include <deque>
using std::cout;
using std::endl;
using namespace std;

void test(){
    string str = "hello str";
    deque<char> deq;
    
    auto it_str = str.begin();
//    auto it_deq = deq.begin();

    while(it_str != str.end()){
        deq.push_back(*it_str);
        it_str++;
    }

    auto it_deq = deq.begin();
    while(it_deq != deq.end()){
        cout << *it_deq << " ";
        it_deq++;
    }
    cout << endl;
}

int main()
{
    test();
    return 0;
}

